package pl.javastart;


import android.app.Activity;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.Menu;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.*;
import android.graphics.*;
import android.view.View;
import android.view.MenuItem;
import android.widget.Button;
import android.widget.Toast;

public class RoboApActivity extends Activity {
	
	Button forward;
	Button back;
	Button f_left;
	Button f_right;
	Button b_left;
	Button b_right;
	Button button_settings_bluethoo;
	Drawable  draw_settings_bluethoo;
	
    @Override
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        forward = (Button) findViewById(R.id.forward);
        back = (Button) findViewById(R.id.back);
        f_left = (Button) findViewById(R.id.f_left);
        f_right = (Button) findViewById(R.id.f_right);
        b_left = (Button) findViewById(R.id.b_left);
        b_right = (Button) findViewById(R.id.b_right);
        
        
      // draw_settings_bluethoo=   (R.id.draw_bluethoo);
        
        
        
        forward.setOnClickListener(new View.OnClickListener() {
 		
 		public void onClick(View v) {
 			Toast.makeText(getApplicationContext(), "Do przodu!", Toast.LENGTH_SHORT).show();
 				
 		}
	});
        
        back.setOnClickListener(new View.OnClickListener() {
     		
 		public void onClick(View v) {
 			Toast.makeText(getApplicationContext(), "Do ty�u!", Toast.LENGTH_SHORT).show();
		}
	});
 
        f_left.setOnClickListener(new View.OnClickListener() {
     		
 		public void onClick(View v) {
 			Toast.makeText(getApplicationContext(), "W lewo!", Toast.LENGTH_SHORT).show();
		}
	});
        
        f_right.setOnClickListener(new View.OnClickListener() {
     		
 		public void onClick(View v) {
 			Toast.makeText(getApplicationContext(), "W prawo!", Toast.LENGTH_SHORT).show();
		}
	});
        
        b_left.setOnClickListener(new View.OnClickListener() {
     		
 		public void onClick(View v) {
 			Toast.makeText(getApplicationContext(), "Do ty�u i w lewo!", Toast.LENGTH_SHORT).show();
		}
	});
        
        b_right.setOnClickListener(new View.OnClickListener() {
     		
 		public void onClick(View v) {
 			Toast.makeText(getApplicationContext(), "Do ty�u i w prawo!", Toast.LENGTH_SHORT).show();
		}
	});
        
    }

    @Override
	public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.main, menu);
        
        
      
       
       
        return true;
    }

    @Override
	public boolean onOptionsItemSelected(MenuItem item) {
        // Handle item selection
        switch (item.getItemId()) {
            case R.id.menu_settings:
            	setContentView(R.layout.blue_sett);	
                return true;
            case R.id.item2:
            	setContentView(R.layout.authors_1);	
                return true;
            default:
                return super.onOptionsItemSelected(item);
        }
    }
    
    
    
    
}
